package com.mac.userinfo.usermanage.service;

import com.github.pagehelper.PageInfo;
import com.mac.userinfo.usermanage.vo.UserInfoVO;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 * 用户登录信息
 */
public interface IUserManageService{
    /**
     * 查询所有数据
     * @param vo
     * @return
     */
    public PageInfo<UserInfoVO> queryAllInfo(UserInfoVO vo, int currentPage, int pageSize);

    /**
     * 保存数据
     * @param vo
     */
    @Transactional(propagation = Propagation.REQUIRED)
    public void insertInfo(UserInfoVO vo);

    /**
     * 保存数据
     * @param voList
     */
    @Transactional(propagation = Propagation.REQUIRED)
    public int insertBatch(List<Map<String, Object>> voList);


    /**
     * 通过Excel导入 批量保存 兑换码信息
     * @param in 要导入的兑换码信息数据流
     * @param maPara 需要转换值的MAP
     * @param column 要导入的兑换码信息字段
     */
    public int addBatch(InputStream in, String column, Map<String, Map<String, Object>> maPara) throws Exception, IOException;
}
